package cn.yuanqiao.archive.chengguojieshou.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 挂接对象 YQDAARTICULATED
 * 
 * @author yuanqiao
 * @date 2023-06-30
 */
public class Yqdaarticulated extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQDAARTICULATED";

    public Yqdaarticulated() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("TenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }

    //@IdAnnotation
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long id;

    private String tableName;
    /** 门类id */
    @Excel(name = "门类id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long categoryId;

    /** 挂接时间 */
    @Excel(name = "挂接时间")
    private String articulatedTime;

    private String articulatedTimeTwo;

    /** 挂接结果 */
    @Excel(name = "挂接结果")
    private String articulatedResults;

    /** 挂接方式 */
    @Excel(name = "挂接方式")
    private String operationMode;

    /** 状态 */
    @Excel(name = "状态")
    private String STATE;

    /** 排序号 */
    @Excel(name = "排序号")
    private String orderNo;

    /** 年度 */
    @Excel(name = "年度")
    private String YEAR;

    /** 批次号 */
    @Excel(name = "批次号")
    private String batchNo;

    public String getArticulatedTimeTwo() {
        return articulatedTimeTwo;
    }

    public void setArticulatedTimeTwo(String articulatedTimeTwo) {
        this.articulatedTimeTwo = articulatedTimeTwo;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public Long getCategoryId() {
        return categoryId;
    }

    @Override
    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public void setArticulatedTime(String articulatedTime)
    {
        this.articulatedTime = articulatedTime;
    }

    public String getArticulatedTime() 
    {
        return articulatedTime;
    }
    public void setArticulatedResults(String articulatedResults) 
    {
        this.articulatedResults = articulatedResults;
    }

    public String getArticulatedResults() 
    {
        return articulatedResults;
    }
    public void setOperationMode(String operationMode) 
    {
        this.operationMode = operationMode;
    }

    public String getOperationMode() 
    {
        return operationMode;
    }
    public void setSTATE(String STATE) 
    {
        this.STATE = STATE;
    }

    public String getSTATE() 
    {
        return STATE;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setYEAR(String YEAR) 
    {
        this.YEAR = YEAR;
    }

    public String getYEAR() 
    {
        return YEAR;
    }
    public void setBatchNo(String batchNo) 
    {
        this.batchNo = batchNo;
    }

    public String getBatchNo() 
    {
        return batchNo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ID", getId())
            .append("categoryId", getCategoryId())
            .append("articulatedTime", getArticulatedTime())
            .append("articulatedResults", getArticulatedResults())
            .append("operationMode", getOperationMode())
            .append("createBy", getCreateBy())
            .append("STATE", getSTATE())
            .append("orderNo", getOrderNo())
            .append("REMARK", getRemark())
            .append("YEAR", getYEAR())
            .append("batchNo", getBatchNo())
            .toString();
    }
}
